#案例：演示setup/teardown/setup_class/teardown_class/test_*的执行顺序、执行次数！
import pytest


class Test01(object):
    def setup_class(self):
        print("setup_class执行了")

    def teardown_class(self):
        print("teardown_class执行了")

    def setup(self):
        print("setup执行啦")

    def teardown(self):
        print("teardown执行啦")

    @pytest.mark.parametrize("d",[{"id":1},{"id":2}])
    def test_login_001(self,d):
        print(f"001执行啦{d}")

    @pytest.mark.parametrize("d", [{"id": 3}, {"id": 4}])
    def test_login_002(self,d):
        print(f"002执行啦{d}")